import { userType, type Option } from '../../../../../types';
import { IBaseSelector } from '../../../selector/base';
import User from '../../../selector/user';
import DefaultCcService from '../interpreter/service';

class UserService extends IBaseSelector {

  component = User;
  interpreter = new DefaultCcService(userType.user);

  get value(){
    return this.interpreter.value;
  }

  onChange(value: Option[]) {
    this.interpreter.onChange(value);
  }

  initData(): void {
    // 无需初始化
  }

  init() {
    this.interpreter.bindPanelService(this.panel);
    this.interpreter.bindBpmnService(this.root);
    this.interpreter.init();
  }
}

export default UserService;
